Optimal. Leaf size=77 \[ \frac {a (2 B+3 C) \sin (c+d x)}{3 d}+\frac {a (B+C) \sin (c+d x) \cos (c+d x)}{2 d}+\frac {a B \sin (c+d x) \cos ^2(c+d x)}{3 d}+\frac {1}{2} a x (B+C) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.16, antiderivative size = 77, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 38, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {4072, 3996, 3787, 2635, 8, 2637} \[ \frac {a (2 B+3 C) \sin (c+d x)}{3 d}+\frac {a (B+C) \sin (c+d x) \cos (c+d x)}{2 d}+\frac {a B \sin (c+d x) \cos ^2(c+d x)}{3 d}+\frac {1}{2} a x (B+C) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2635
Rule 2637
Rule 3787
Rule 3996
Rule 4072
Rubi steps
\begin {align*} \int \cos ^4(c+d x) (a+a \sec (c+d x)) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx &=\int \cos ^3(c+d x) (a+a \sec (c+d x)) (B+C \sec (c+d x)) \, dx\\ &=\frac {a B \cos ^2(c+d x) \sin (c+d x)}{3 d}-\frac {1}{3} \int \cos ^2(c+d x) (-3 a (B+C)-a (2 B+3 C) \sec (c+d x)) \, dx\\ &=\frac {a B \cos ^2(c+d x) \sin (c+d x)}{3 d}+(a (B+C)) \int \cos ^2(c+d x) \, dx+\frac {1}{3} (a (2 B+3 C)) \int \cos (c+d x) \, dx\\ &=\frac {a (2 B+3 C) \sin (c+d x)}{3 d}+\frac {a (B+C) \cos (c+d x) \sin (c+d x)}{2 d}+\frac {a B \cos ^2(c+d x) \sin (c+d x)}{3 d}+\frac {1}{2} (a (B+C)) \int 1 \, dx\\ &=\frac {1}{2} a (B+C) x+\frac {a (2 B+3 C) \sin (c+d x)}{3 d}+\frac {a (B+C) \cos (c+d x) \sin (c+d x)}{2 d}+\frac {a B \cos ^2(c+d x) \sin (c+d x)}{3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.20, size = 65, normalized size = 0.84 \[ \frac {a (3 (3 B+4 C) \sin (c+d x)+3 (B+C) \sin (2 (c+d x))+B \sin (3 (c+d x))+6 B c+6 B d x+6 c C+6 C d x)}{12 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.49, size = 56, normalized size = 0.73 \[ \frac {3 \, {\left (B + C\right )} a d x + {\left (2 \, B a \cos \left (d x + c\right )^{2} + 3 \, {\left (B + C\right )} a \cos \left (d x + c\right ) + 2 \, {\left (2 \, B + 3 \, C\right )} a\right )} \sin \left (d x + c\right )}{6 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 1.02, size = 124, normalized size = 1.61 \[ \frac {3 \, {\left (B a + C a\right )} {\left (d x + c\right )} + \frac {2 \, {\left (3 \, B a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 3 \, C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 4 \, B a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 12 \, C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 9 \, B a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 9 \, C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{3}}}{6 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 1.16, size = 85, normalized size = 1.10 \[ \frac {\frac {a B \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+a B \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+a C \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+a C \sin \left (d x +c \right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.34, size = 79, normalized size = 1.03 \[ -\frac {4 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} B a - 3 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} B a - 3 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} C a - 12 \, C a \sin \left (d x + c\right )}{12 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.86, size = 84, normalized size = 1.09 \[ \frac {B\,a\,x}{2}+\frac {C\,a\,x}{2}+\frac {3\,B\,a\,\sin \left (c+d\,x\right )}{4\,d}+\frac {C\,a\,\sin \left (c+d\,x\right )}{d}+\frac {B\,a\,\sin \left (2\,c+2\,d\,x\right )}{4\,d}+\frac {B\,a\,\sin \left (3\,c+3\,d\,x\right )}{12\,d}+\frac {C\,a\,\sin \left (2\,c+2\,d\,x\right )}{4\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________